function sum=TriangleGauss(method,fun)
switch method
    case 1
        pos=[1/3,1/3];
        coe=1;
        pos_cell=num2cell(pos,2);
        sum=coe*cellfun(fun, pos_cell);
    case 3
        pos=[
            0.5,  0.5;
            0,      0.5;
            0.5,   0;  ];
        coe=[1/3,1/3,1/3];
        pos_cell=num2cell(pos,2);
        sum=coe*cellfun(fun, pos_cell);
    case 4
        pos=[
            1/3,1/3
            0.73333333, 0.13333333;
            0.13333333, 0.73333333;
            0.13333333, 0.13333333;
            ];

        coe=[
            -0.56250000  0.52083333  ...
            0.52083333     0.52083333 ];
        pos_cell=num2cell(pos,2);
        sum=coe*cellfun(fun, pos_cell);
    case 71
        % Gauss 7,1
        pos=[
            1/3,1/3;
            0.5,0.5;
            0, 0.5;
            0.5,0;
            1,0;
            0,1;
            0,0 ];
        coe=[0.45 ...
            0.13333333  0.13333333  0.13333333...
            0.05    0.05    0.05];
        pos_cell=num2cell(pos,2);
        sum=coe*cellfun(fun, pos_cell);
    case 72
        % Gauss 7,2
        pos=[
            1/3,1/3;
            0.05961587,0.47014206;
            0.47014206,0.05961587;

            0.47014206,0.47014206;
            0.79742699,0.10128651;
            0.10128651,0.79742699;
            0.10128651,0.10128651;
            ];
        coe=[
            0.225 0.13239415 0.13239415 0.13239415 ...
            0.12593918  0.12593918  0.12593918
            ];
        pos_cell=num2cell(pos,2);
        sum=coe*cellfun(fun, pos_cell);
end

end